<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%><%@ include file="../inc/header.jsp"%>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<html>
<head>
<title>新增</title>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/jquery.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/jquery.validate.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/My97DatePicker/WdatePicker.js"></script>
<link rel="stylesheet" type="text/css" media="screen" href="${pageContext.request.contextPath}/css/add.css" />
<script>
	$(document).ready(function() {
		$("#login").validate();
		var elements = $("input[type!='submit'], textarea, select");
		elements.focus(function(){
			$(this).parents('li').addClass('highlight');
		});
		elements.blur(function(){
			$(this).parents('li').removeClass('highlight');
		});
	});
</script>
</head>
<body>
<form:form method="POST" id="login" style="width: 600px;">
<div id = "page">
	<fieldset>
		<legend>新增用户</legend>
		<ul>
			<li>
				<label for="username"><span class="required">用户名:</span></label> 
				<input id="username" name="username" class="text required" type="text" value="${command.username}" /> 
				<form:errors path="username" class="error" />
			</li>

			<li>
				<label for="email"><span class="required">电子邮箱:</span></label>
				<input name="email" type="text" class="text required" id="email" value="${command.email}" /> 
				<form:errors path="email" class="error" />
			</li>
			
			<li>
				<label for="password"><span class="required">密码</span></label>
				<input name="password" type="password" class="text required" id="password" value="${command.password}" /> 
				<form:errors path="password" class="error" />
			</li>
			
			<li>
				<label for="registerDate"><span class="required">注册时间</span></label>
				<input name="registerDate" type="text" class="text required" id="registerDate" value="${command.registerDate}" readonly="readonly" class="Wdate"
					onFocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss'})" /><span class="comment">(格式2010-1-1 11:1:1)</span>
				<form:errors path="registerDate" class="error" />
			</li>
		</ul>
	</fieldset>

	<fieldset class="submit">
		<input type="submit" value="提交" style = "display: inline; margin-right:10px;"/>
		<input type="button" style = "display: inline; margin-right:10px;" onclick="window.location.href='<c:url value="/user"/>'" value = "取消" />
	</fieldset>
	<div class="clear"></div>
</div>
</form:form>
</body>
</html>
